Skip to content

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Sep 26, 2025

Summary by CodeRabbit

  • 重构
    • 组件由 UniqueBody 重命名为 UniqueContainer。
    • 对外 props 更名:uniqueBgClassName → uniqueContainerClassName,uniqueBgStyle → uniqueContainerStyle。
    • 上下文与触发器的相关选项同步更名,行为保持不变。
  • 样式
    • 选择器后缀由 -unique-body 调整为 -unique-container。
    • 自定义 className/style 现应用于容器元素。
  • 提示
    • 这是一次兼容性变更,升级请替换旧有 props 与样式选择器名称。

Copy link

coderabbitai bot commented Sep 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

此次变更将 “UniqueBody/uniqueBg*” 统一重命名为 “UniqueContainer/uniqueContainer*”。包含样式选择器从 -unique-body → -unique-container,组件与导出命名变更,公共 props/type 替换,并在 Provider、触发器入口与测试中全量对齐新命名。

Changes

Cohort / File(s) Summary
样式选择器重命名
assets/index.less
将 .@{triggerPrefixCls}-unique-body 重命名为 -unique-container,其余样式保持不变。
UniqueProvider 组件调整
src/UniqueProvider/UniqueContainer.tsx, src/UniqueProvider/index.tsx
重命名组件 UniqueBody → UniqueContainer;接口 UniqueBodyProps → UniqueContainerProps;props uniqueBgClassName/uniqueBgStyle → uniqueContainerClassName/uniqueContainerStyle;相关类名变量与传参与动画类名对齐“container”前缀。
公共 API 与上下文
src/context.ts, src/index.tsx
在 UniqueShowOptions 与 TriggerProps 中移除 uniqueBgClassName/uniqueBgStyle,新增 uniqueContainerClassName/uniqueContainerStyle;内部透传与 getUniqueOptions 对应更新。
测试对齐
tests/unique.test.tsx
测试用例从 UniqueBody 更新为 UniqueContainer;断言的类名、样式与描述统一采用 rc-trigger-popup-unique-container 与 uniqueContainer* 字段。

Sequence Diagram(s)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

小兔举耳看云翻,
Body化作Container还。
类名轻换风不变,
样式随行影相连。
代码齐步新冠名,
叮咚一过更清澈。 🐇✨

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch container

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 888b0df and f16d257.

📒 Files selected for processing (6)
  • assets/index.less (1 hunks)
  • src/UniqueProvider/UniqueContainer.tsx (6 hunks)
  • src/UniqueProvider/index.tsx (3 hunks)
  • src/context.ts (1 hunks)
  • src/index.tsx (3 hunks)
  • tests/unique.test.tsx (6 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.41%. Comparing base (888b0df) to head (f16d257).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #582   +/-   ##
=======================================
  Coverage   96.41%   96.41%           
=======================================
  Files          17       17           
  Lines         948      948           
  Branches      278      278           
=======================================
  Hits          914      914           
  Misses         34       34           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Summary of Changes

Hello @zombieJ, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a significant refactoring effort to enhance the clarity and consistency of the codebase. It renames the UniqueBody component to UniqueContainer, along with all its related properties, CSS classes, and usages throughout the application. The change aims to provide a more descriptive and accurate name for the component's role, making the code easier to understand and maintain without altering its functional behavior.

Highlights

  • Component Renaming: The UniqueBody component has been renamed to UniqueContainer to better reflect its purpose and improve code clarity. This includes the file name, component function, and associated TypeScript interface (UniqueBodyProps to UniqueContainerProps).
  • Prop Renaming: The props uniqueBgClassName and uniqueBgStyle have been consistently renamed to uniqueContainerClassName and uniqueContainerStyle across all relevant interfaces and component usages.
  • CSS Class Update: The corresponding CSS class in assets/index.less has been updated from &-unique-body to &-unique-container to match the new component naming.
  • Test Suite Alignment: All unit tests in tests/unique.test.tsx have been updated to reflect the new component and prop names, ensuring continued test coverage and correctness.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors UniqueBody to UniqueContainer for better clarity, along with related properties like uniqueBgClassName to uniqueContainerClassName. The changes are applied consistently across component logic, styles, and tests. The file src/UniqueProvider/UniqueBody.tsx has also been renamed to src/UniqueProvider/UniqueContainer.tsx. This refactoring is well-executed and improves the descriptiveness of the code, making it more maintainable. I've reviewed the changes and they look good. No issues found.

@zombieJ zombieJ merged commit 250a7c6 into master Sep 26, 2025
9 of 10 checks passed
@zombieJ zombieJ deleted the container branch September 26, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant